package com.okaixz.manager.article.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.okaixz.common.annotation.Excel;
import com.okaixz.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * AI写作案例对象 c_article
 *
 * @author ruoyi
 * @date 2024-08-18
 */
@Data
public class CArticle extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 文章标题 */
    @Excel(name = "文章标题")
    private String title;
    @Excel(name = "seo标题")
    private String seoTitle;

    /** 文章描述 */
    @Excel(name = "文章描述")
    private String description;

    /** 关键字 */
    @Excel(name = "关键字")
    private String keywords;

    /** 关键字 */
    @Excel(name = "图片")
    private String imgs;

    /** 关键字 */
    @Excel(name = "路径")
    private String path;

    /** 文章内容 */
    @Excel(name = "文章内容")
    private String content;

    /** 所属标签 */
    @Excel(name = "所属标签")
    private Long tabId;
    /** 所属标签 */
    @Excel(name = "所属标签名字")
    private String tabName;
    /** 所属标签 */
    @Excel(name = "所属标签")
    private Long parentId;

    /** 查看数 */
    @Excel(name = "查看数")
    private Long views;

    /** 状态 0禁用 1启用 */
    @Excel(name = "状态 0禁用 1启用")
    private Long status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modityTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("title", getTitle())
            .append("description", getDescription())
            .append("keywords", getKeywords())
            .append("content", getContent())
            .append("tabId", getTabId())
            .append("views", getViews())
            .append("status", getStatus())
            .append("createdTime", getCreatedTime())
            .append("modityTime", getModityTime())
            .toString();
    }
}
